473,418 Members | 2,079 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,418 software developers and data experts.

inhoud van formulierveld gebruiken als bestandsnaam bij output naar excel.

Help !

Ik gebruik een macro om een query uit te voeren naar ExceL. Dit werkt
perfect. Nu wil ik echter dat het Excel-bestand als bestandsnaam de
inhoud van een formulierveld gebruikt (formulier staat open). Wat ik
ook invoer bij "uitvoerbestand" (dingen als [Forms]![klant]!
[klantnr] ; ([Forms]![klant]![klantnr]) ;= [Forms]![klant]!
[klantnr] ; ...)
ik krijg steeds een "file" met als bestandsnaam datgene wat ik had
ingevuld bij uitvoerbestand (zelfs met de tekens die normaal niet
toegestaan zijn voor bestandsnamen.

Kan iemand mij vertellen hoe ik dit in orde krijg. Er resten mij
immers nog een 200-tal outputs uit te voeren ....

Embee

Sep 5 '07 #1
1 2756
On Wed, 05 Sep 2007 12:30:13 -0700, em*****@skynet.be wrote:

Men spreekt hier Engels.
Macros may not be powerful enough for what you want to do, but you can
certainly write one line of VBA code to do this with
DoCmd.TransferSpreadsheet
and then using:
"c:\test\" & [Forms]![klant]![klantnr] & ".xls"
as the FileName argument.

-Tom.

>Help !

Ik gebruik een macro om een query uit te voeren naar ExceL. Dit werkt
perfect. Nu wil ik echter dat het Excel-bestand als bestandsnaam de
inhoud van een formulierveld gebruikt (formulier staat open). Wat ik
ook invoer bij "uitvoerbestand" (dingen als [Forms]![klant]!
[klantnr] ; ([Forms]![klant]![klantnr]) ;= [Forms]![klant]!
[klantnr] ; ...)
ik krijg steeds een "file" met als bestandsnaam datgene wat ik had
ingevuld bij uitvoerbestand (zelfs met de tekens die normaal niet
toegestaan zijn voor bestandsnamen.

Kan iemand mij vertellen hoe ik dit in orde krijg. Er resten mij
immers nog een 200-tal outputs uit te voeren ....

Embee
Sep 7 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Beowulf | last post by:
Hi, I have an XML file generated by a third party (and therefore unchangable) program. 1st line in it is <?xml version="1.0" encoding="us-ascii"?> and down in the depths of the xml I have a...
1
by: tkaleb | last post by:
I have to create output file in a text, MS Access, MS Excel and .dbf format from C# Win/ADO.NET application. Data are collected in DataSet and there is no problem to make text file. However, I have...
6
by: Mark Rae | last post by:
Hi, My client has asked me to provide a "quick and dirty" way to export the contents of a DataGrid to both Excel for analysis and Word for editing and printing, so I'm investigating client-side...
5
ADezii
by: ADezii | last post by:
Periodically, the same or similar question appears in our Access Forum: How can I use Excel Functions within Access? For this reason, I decided to make this Subject TheScripts Tip of the Week. In...
3
by: =?Utf-8?B?UGF1bA==?= | last post by:
Hi I have an sql database and I need to do the following, hoping there are some examples I can look at to impliment. 1. Copy an excel file on the server, just using a new name. For example...
1
by: DennisBetten | last post by:
First of all, I need to give some credit to Mahesh Chand for providing me with an excellent basis to export data to excel. What does this code do: As the title says, this code is capable of...
4
by: drt | last post by:
NEDERLANDS: Hallo, Ik heb eigen functies gemaakt in access, die werken perfect in de access query. Zodra ik echter vanuit excel een draaitabel maakt naar de access query (als een externe...
18
by: Paul Lautman | last post by:
JRough wrote: What do you mean by "redirect the output to Excel"??? Excel isn't a location, it's a spreadsheet program that some (but not all users) will have on their machine. BTW, Location:...
0
by: =?Utf-8?B?ZGlzcGxheW5hbWU=?= | last post by:
The following code used to outputs to Excel 2003 fine. Do I need to change it to output to Excel 2007? <% Response.ContentType = "application/vnd.ms-excel" Response.AddHeader...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.